<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./WEB-INF/templates/turnitup_template.xhtml"
                xmlns:p="http://primefaces.org/ui"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:define name="top">
        <ui:include src="./WEB-INF/templates/logo_bar.xhtml"/>
        <p:breadCrumb>
            <p:menuitem outcome="index"/>
            <p:menuitem value="#{webtext.my_order}" url="basket"/>
            <p:menuitem value="#{webtext.payment}" url="#" disabled="true"/>
        </p:breadCrumb>
    </ui:define>

    <ui:define name="menu_left">
    </ui:define>

    <ui:define name="basket">
    </ui:define>

    <ui:define name="content">
        <h:panelGroup layout="block" id="content_panel">
            <p:messages id="messages_payment" showDetail="true" autoUpdate="true" closable="true" />
            <h:outputText styleClass="content_title" value="#{webtext.payment}"/>
            <p:separator/>
            <h:form>
                <h:panelGrid columns="2" style="border: 1px solid;">
                    <h:outputText value="#{webtext.name}"/>
                    <h:outputText value="#{basketController.customerOrder.userId.name}"/>
                    <h:outputText value="#{webtext.surname}"/>
                    <h:outputText value="#{basketController.customerOrder.userId.surname}"/>
                    <h:outputText value="#{webtext.email}"/>
                    <h:outputText value="#{basketController.customerOrder.userId.email}"/>
                    <h:outputText value="#{webtext.phone}"/>
                    <h:outputText value="#{basketController.customerOrder.userId.phone}"/>
                    <h:outputText value="#{webtext.address}"/>
                    <h:outputText value="#{basketController.customerOrder.userId.address}"/>
                    <h:outputText value="#{webtext.country}"/>
                    <h:outputText value="#{basketController.customerOrder.userId.country}"/>
                    <h:outputText value="#{webtext.city}"/>
                    <h:outputText value="#{basketController.customerOrder.userId.city}"/>
                    <h:outputText value="#{webtext.postal_code}"/>
                    <h:outputText value="#{basketController.customerOrder.userId.postalCode}"/>
                    <h:outputLabel value="#{webtext.ccard}" for="ccard" />
                    <p:inputText id="ccard" value="#{basketController.ccard}" required="true" requiredMessage="#{webtext.requiredMessage_ccard}" validatorMessage="#{webtext.validation_ccard}">
                        <f:validateRegex pattern="[0-9]+"/>
                    </p:inputText>
                    <p:message for="ccard"/>
                    <p:commandButton value="#{webtext.confirm}" action="#{basketController.finishOrder}"/>
                </h:panelGrid>
                <h:link value="#{webtext.back}" outcome="basket"/>
            </h:form>
        </h:panelGroup>
    </ui:define>

    <ui:define name="footer">
        <ui:include src="./WEB-INF/templates/footer.xhtml"/>
    </ui:define>

</ui:composition>
